#ifndef _HCC_ERROR_CODE_MID_XBUS_H_
#define _HCC_ERROR_CODE_MID_XBUS_H_

#include "ofc/ofc_types.h"
#include "hcc/hcc_error_code.h"
#include "hcc/hcc_error_code_mid.h"

#ifdef __cplusplus
extern "C" {
#endif

// 不含行号的错误码生成
#define HCC_MAKE_MID_XBUS_ERROR(error_code) (int)HCC_MAKE_MID_WARE_ERROR(kHccMidWareXbus, error_code, HCC_ERROR_LEVEL_ERROR)
// 含行号的错误码生成
#define HCC_MAKE_MID_XBUS_ERROR_LINE(error_code) (int)HCC_ERROR(HCC_MAKE_MID_WARE_ERROR(kHccMidWareXbus, error_code, HCC_ERROR_LEVEL_ERROR))


/**
 * 消息总线库:
 */
enum THccMidXbusErrorCodeTag
{
	kHccMidXbusSuccess	=	HCC_ERROR_SUCCESS,			///< 成功,没有错误
	kHccMidXbusInvalidParam	=	HCC_MAKE_MID_XBUS_ERROR(1),			///<无效的参数
	kHccMidXbusQueueFull	=	HCC_MAKE_MID_XBUS_ERROR(2),			///<队列已经超出存储范围
	kHccMidXbusUninit	=	HCC_MAKE_MID_XBUS_ERROR(3),			///<队列未初始化
	kHccMidXbusExists	=	HCC_MAKE_MID_XBUS_ERROR(4),			///<队列已经存在,已经初始化
	kHccMidXbusQueueWaring	=	HCC_MAKE_MID_XBUS_ERROR(5),			///<队列警告,超过警卫线
	kHccMidXbusBusTimeout	=	HCC_MAKE_MID_XBUS_ERROR(6),			///<总线超时
	kHccMidXbusMsgMemFault	=	HCC_MAKE_MID_XBUS_ERROR(7),			///<消息内存故障,校验失败
	kHccMidXbusBusy	=	HCC_MAKE_MID_XBUS_ERROR(8),			///<总线繁忙
	kHccMidXbusInitFail	=	HCC_MAKE_MID_XBUS_ERROR(9),			///<初始化失败
	kHccMidXbusNoMemory	=	HCC_MAKE_MID_XBUS_ERROR(10),			///<缺少内存
	kHccMidXbusMsgTimeout	=	HCC_MAKE_MID_XBUS_ERROR(11),			///<消息超时
	kHccMidXbusEventTimeout	=	HCC_MAKE_MID_XBUS_ERROR(12),			///<事件超时
	kHccMidXbusThreadEvent	=	HCC_MAKE_MID_XBUS_ERROR(13),			///<线程事件错误
	kHccMidXbusEventFlag	=	HCC_MAKE_MID_XBUS_ERROR(14),			///<事件标记
	kHccMidXbusInitEventFail	=	HCC_MAKE_MID_XBUS_ERROR(15),			///<事件初始化失败
	kHccMidXbusInitMutexFail	=	HCC_MAKE_MID_XBUS_ERROR(16),			///<互斥锁初始化失败
	kHccMidXbusMsgRepeat	=	HCC_MAKE_MID_XBUS_ERROR(17),			///<消息重复
	kHccMidXbusMsgQueueFail	=	HCC_MAKE_MID_XBUS_ERROR(18),			///<消息队列失败通用错误
};
typedef enum THccMidXbusErrorCodeTag THccMidXbusErrorCode;


typedef Int32 THccMidXbusErrorCodeLine;
#define kHccMidXbusSuccessLine	HCC_ERROR_SUCCESS	///< 成功,没有错误
#define kHccMidXbusInvalidParamLine	HCC_MAKE_MID_XBUS_ERROR_LINE(1)	///<无效的参数
#define kHccMidXbusQueueFullLine	HCC_MAKE_MID_XBUS_ERROR_LINE(2)	///<队列已经超出存储范围
#define kHccMidXbusUninitLine	HCC_MAKE_MID_XBUS_ERROR_LINE(3)	///<队列未初始化
#define kHccMidXbusExistsLine	HCC_MAKE_MID_XBUS_ERROR_LINE(4)	///<队列已经存在,已经初始化
#define kHccMidXbusQueueWaringLine	HCC_MAKE_MID_XBUS_ERROR_LINE(5)	///<队列警告,超过警卫线
#define kHccMidXbusBusTimeoutLine	HCC_MAKE_MID_XBUS_ERROR_LINE(6)	///<总线超时
#define kHccMidXbusMsgMemFaultLine	HCC_MAKE_MID_XBUS_ERROR_LINE(7)	///<消息内存故障,校验失败
#define kHccMidXbusBusyLine	HCC_MAKE_MID_XBUS_ERROR_LINE(8)	///<总线繁忙
#define kHccMidXbusInitFailLine	HCC_MAKE_MID_XBUS_ERROR_LINE(9)	///<初始化失败
#define kHccMidXbusNoMemoryLine	HCC_MAKE_MID_XBUS_ERROR_LINE(10)	///<缺少内存
#define kHccMidXbusMsgTimeoutLine	HCC_MAKE_MID_XBUS_ERROR_LINE(11)	///<消息超时
#define kHccMidXbusEventTimeoutLine	HCC_MAKE_MID_XBUS_ERROR_LINE(12)	///<事件超时
#define kHccMidXbusThreadEventLine	HCC_MAKE_MID_XBUS_ERROR_LINE(13)	///<线程事件错误
#define kHccMidXbusEventFlagLine	HCC_MAKE_MID_XBUS_ERROR_LINE(14)	///<事件标记
#define kHccMidXbusInitEventFailLine	HCC_MAKE_MID_XBUS_ERROR_LINE(15)	///<事件初始化失败
#define kHccMidXbusInitMutexFailLine	HCC_MAKE_MID_XBUS_ERROR_LINE(16)	///<互斥锁初始化失败
#define kHccMidXbusMsgRepeatLine	HCC_MAKE_MID_XBUS_ERROR_LINE(17)	///<消息重复
#define kHccMidXbusMsgQueueFailLine	HCC_MAKE_MID_XBUS_ERROR_LINE(18)	///<消息队列失败通用错误

//旧版本适配补丁
#define kHccMidXbusCodeSuccess kHccMidXbusSuccess


#ifdef __cplusplus
}  // extern "C"
#endif

#endif // _HCC_ERROR_CODE_MID_XBUS_H_
/**
 * @
 */
